<%@page contentType="text/html;charset=UTF-8"%>
<%@include file="/common/taglibs.jsp"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>项目管理</title>
<script type="text/javascript"
	src="<c:url value='/scripts/global.js'/>"></script>
<script type="text/javascript">
function returnProject(){
	var checkedRadio = $("input[name='item']:checked");
	var projectId = checkedRadio.val();
	if(projectId == null){
		 alert('请选择要操作的对象!');
		 return false;
	}
	$(window.parent.setPorjectId(projectId));
	$(window.parent.close()); 
}
function addNewProject(){
	$(window.parent.addNewProject());
	$(window.parent.close()); 
}

function gobackMain(){  
    var topWindow = window.parent||window;
     topWindow.location.href="<c:url value='/'/>";
    }
</script>
</head>
<body>
		<div id="message">
			<s:actionmessage theme="custom" cssClass="success" />
		</div>
	<form id="mainForm" action="projectinfo!windows.action" method="get"
		class="yform">
	<div id="filter" >
			<ul style="z-index: 9999">
			<li>项目类型：<pt:code category="3001" prompt="全部类型" name="filter_EQS_projKind" default="${param['filter_EQS_projKind']}"></pt:code></li>
			<li>项目名称：<input  type="text" name="filter_LIKES_projName"  value="${param['filter_LIKES_projName']}" style="width: 40" /></li>			
			</ul>
			<div class="type-button"><input type="button" class="search" value="查询" onclick="search();" /></div>
		</div>
		<div id="content">
			<table id="contentTable">
				<tr>
					<th>工程类型</th>
					<th>项目名称</th>
					<th>开工时间</th>
					<th>状态</th>
				</tr>
				<c:forEach items="${page.result}" var="proj">
					<tr>
						<td width="30">
						<input type="radio" name="item" id="item" value="${proj.id }" size="2"></input>
						<pt:code  name="projKind" category="3001" code="${proj.projKind}"></pt:code></td>
						<td>${proj.projName}</td>
						<td>${proj.planStartDate}</td>
						<td>${proj.status }</td>
					</tr>
				</c:forEach>
				<tr><td style="padding-left: 50px"><div class="type-button">
				<input type="button" onclick="returnProject()"value="选择" class="submit"></input></div></td>
				<td colspan="4">&nbsp;</td></tr>
			</table>
		</div>
		<jsp:include page="/common/page.jsp" flush="true" />
		<div class="type-button">
			<input class="submit" type="button" class="submit" onclick="addNewProject();"
				value="新增" />
			&nbsp; <input
				 type="button" value="取消" class="reset"
				onclick="gobackMain();" />
		</div>
	</form>
</body>
</html>
